﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace GameSchool.Models
{
	/// <summary>
	/// VideoLecture er gagnaklasi sem geymir þær upplýsingar sem þarf til að skrá nýtt video í gagnagrunninn.
	/// </summary>  

    [Table("gs_video_lecture")]
	public class VideoLecture
    {
        [Key]
        [Column("video_lecture_id")]
        public int VideoLectureId { get; set; }

        [Column("video_title")]
		[Display(Name = "Titill")]
        [Required(ErrorMessage = "Vinsamlegast settu inn titil")]
        public string VideoTitle { get; set; }

        [Column("assignment_id")]
        public int AssignmentId { get; set; }

        [ForeignKey("AssignmentId")]
        public virtual Assignment Assignment { get; set; }

        [Column("video_url")]
		[Display(Name = "Id youtube myndbands")]
        [Required(ErrorMessage = "Vinsamlegast settu inn id fyrir youtube myndband")]
        public string VideoUrl { get; set; }

        [Column("active")]
        public bool Active { get; set; }

        [Column("entry_date")]
        public DateTime EntryDate { get; set; }

        [Column("entry_by")]
        public int EntryById { get; set; }

        [ForeignKey("EntryById")]
        public virtual Person EntryBy { get; set; }
    }
}